home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADN1.IN_ / oemnadn1.inf
INI File  |  1996-07-12  |  30KB  |  762 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     "Jazz-Internal Bus"
  7. [Options]
  8.     NE1000
  9. [FileConstants]
  10. UtilityInf      = "UTILITY.INF"
  11. ParamInf        = "NCPARAM.INF"
  12. subroutineinf   = "SUBROUTN.INF"
  13. SoftwareType    = "driver"
  14. Exit_Code       = 0
  15. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  16. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  17. Manufacturer    = "Microsoft"
  18. ProductMajorVersion     = "4"
  19. ProductMinorVersion     = "0"
  20. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  21. ProductSoftwareName     = "NE1000"
  22. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\ne1000.sys"
  23. NetRuleSoftwareType     = "ne1000Sys ndisDriver ne1000Driver"
  24. NetRuleSoftwareUse      = $(SoftwareType)
  25. NetRuleSoftwareBindForm = """Ne1000Sys"" yes no container"
  26. NetRuleSoftwareClass    = {"ne1000Driver basic"}
  27. NetRuleSoftwareBindable = {"ne1000Driver ne1000Adapter non exclusive 100"} 
  28. ProductHardwareName     = "NE1000"
  29. NetRuleHardwareType     = "ne1000 ne1000Adapter"
  30. NetRuleHardwareBindForm = " yes yes container"
  31. NetRuleHardwareClass    = {"ne1000Adapter basic"}
  32. ProductOpSupport     = 134 
  33. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  34. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  35. [GeneralConstants]
  36. from      = ""
  37. to        = ""
  38. ExitCodeOk     = 0
  39. ExitCodeCancel = 1
  40. ExitCodeFatal  = 2
  41. KeyNull         = ""
  42. MAXIMUM_ALLOWED   = 33554432
  43. RegistryErrorIndex = NO_ERROR
  44. KeyProduct      = ""
  45. KeyParameters   = ""
  46. TRUE            = 1
  47. FALSE           = 0
  48. NoTitle            = 0
  49. ExitState   = "Active"
  50. OldVersionExisted = $(FALSE)
  51. DriverPath      = $(!STF_NTPATH)\drivers
  52. [date]
  53.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  54. [Identify]
  55.     read-syms Identification
  56.     set Status     = STATUS_SUCCESSFUL
  57.     set Identifier = $(OptionType)
  58.     set Media      = #("Source Media Descriptions", 1, 1)
  59.     Return $(Status) $(Identifier) $(Media)
  60. [ReturnOptions]
  61.     set Status        = STATUS_FAILED
  62.     set OptionList     = {}
  63.     set OptionTextList = {}
  64.     set LanguageList = ^(LanguagesSupported, 1)
  65.     Ifcontains(i) $($0) in $(LanguageList)
  66.         ifstr(i) $($1) == ""
  67.            goto returnoptions
  68.         endif
  69.         set PlatformList = ^(PlatformsSupported, 1)
  70.         Ifcontains(i) $($1) in $(PlatformList)
  71.            goto returnoptions
  72.         else
  73.            set Status = STATUS_NOTSUPPORTED
  74.            goto finish_ReturnOptions
  75.         endif
  76.     else
  77.         set Status = STATUS_NOLANGUAGE
  78.         goto finish_ReturnOptions
  79.     endif
  80. returnoptions = +
  81.     set OptionList     = ^(Options, 1)
  82.     set OptionTextList = ^(OptionsText$($0), 1)
  83.     set Status         = STATUS_SUCCESSFUL
  84. finish_ReturnOptions = +
  85.     Return $(Status) $(OptionList) $(OptionTextList)
  86. [InstallOption]
  87.     set Option   = $($1)
  88.     set SrcDir   = $($2)
  89.     set AddCopy  = $($3)
  90.     set DoCopy   = $($4)
  91.     set DoConfig = $($5)
  92.     set LanguageList = ^(LanguagesSupported, 1)
  93.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  94.         Return STATUS_NOLANGUAGE
  95.     endif
  96.     set-subst LF = "\n"
  97.     read-syms GeneralConstants
  98.     read-syms FileConstants
  99.     read-syms DialogConstants$(!STF_LANGUAGE)
  100.     ifstr(i) $(!NTN_Origination) == "NCPA"
  101.         set Continue = $(OK)
  102.     endif
  103.     read-syms FileConstants$(!STF_LANGUAGE)
  104.     detect date
  105.     set-title  $(FunctionTitle)
  106.     set to   = Begin
  107.     set from = Begin
  108.     set CommonStatus = STATUS_SUCCESSFUL
  109.     EndWait
  110. Begin = +
  111.     set ActivateDetection = FALSE
  112.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  113.                 set StartLabel = removeadapter
  114.         else-Ifstr(i) $(!NTN_InstallMode) == Update
  115.                         set StartLabel = UpgradeSoftware
  116.         else-Ifstr(i) $(!NTN_InstallMode) == bind
  117.                 set StartLabel = bindingadapter
  118.         else-Ifstr(i) $(!NTN_InstallMode) == configure
  119.                 set CommonStatus = STATUS_REBOOT
  120.                 set ActivateDetection = TRUE
  121.                 set StartLabel = configureadapter
  122.                 Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  123.                         Debug-Output "Cannot configure the Novell 1000 driver software."
  124.                         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  125.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  126.                                 Debug-Output "ShellCode error: cannot get an error string."
  127.                                 goto ShellCodeError
  128.                         endif
  129.                         set Error = $($R0)
  130.                         set from = end
  131.                         set to = end
  132.                         goto nonfatalinfo
  133.                 endif
  134.     else
  135.                 set StartLabel = installadapter
  136.                 set OEM_ABANDON_OPTIONS = {}
  137.                 set OEM_ABANDON_SOFTWARE = FALSE
  138.                 set OEM_ABANDON_ON = TRUE
  139.                 set ActivateDetection = TRUE
  140.     endif
  141.     Debug-Output "OEMNADN2.INF: =================================================="
  142.     Debug-Output "OEMNADN2.INF: STF_CWDIR is: "$(!STF_CWDIR)
  143.     Debug-Output "OEMNADN2.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  144.     Debug-Output "OEMNADN2.INF: Option is: "$(Option)
  145.     Debug-Output "OEMNADN2.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  146.     Debug-Output "OEMNADN2.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  147.     Debug-Output "OEMNADN2.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  148.     Debug-Output "OEMNADN2.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  149.     Debug-Output "OEMNADN2.INF: =================================================="
  150.     Set DetectedCard = FALSE
  151.     Ifstr(i) $(ActivateDetection) != TRUE
  152.         Goto skipdetection
  153.     Endif
  154.     Set TypeList = {{IRQ,IRQList,IRQValue},+
  155.                     {IOADDR, IOBaseAddrDecList, IOBaseAddrValue}}
  156.     Debug-Output "OEMNADN2.INF: Calling Param_BuildTypeLists"
  157.     Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  158.     Set Status = $($R0)
  159.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  160.         Goto fataldetect
  161.     Endif
  162.     Debug-Output "OEMNADN2.INF: Calling Param_SetDefaults"
  163.     Shell $(ParamInf) Param_SetDefaults {}
  164.     Shell $(ParamInf) HexListFromDecList $(IOBaseAddrDecList)
  165.     Set IOBaseAddrHexList = $($R0)
  166.     Ifstr(i) $(!STF_NCDETECT) == YES
  167.         Ifstr(i) $(!STF_NCOPTION) == $(Option)
  168.            Set DetectedCard = TRUE
  169.            Debug-Output "OEMNADN2.INF: Setting DetectedCard to TRUE"
  170.         Endif
  171.     Endif
  172. skipdetection =+
  173.     set from = $(fatal)
  174.     set to = $(fatal)
  175.     goto $(StartLabel)
  176. installadapter = +
  177.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  178.     Ifstr $(KeyProduct) != $(KeyNull)
  179.         CloseRegKey $(KeyProduct)
  180.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  181.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  182.                $(ProductVersion)
  183.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  184.                Debug-Output "ShellCode error: cannot get an error string."
  185.                goto ShellCodeError
  186.            endif
  187.            goto end
  188.         else
  189.            Shell $(UtilityInf), CardExistedDlg
  190.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  191.                Debug-Output "ShellCode error: cannot get an error string."
  192.                goto ShellCodeError
  193.            endif
  194.            ifstr(i) $($R1) != "OK"
  195.                set CommonStatus = STATUS_USERCANCEL
  196.                goto end
  197.            endif
  198.            set OldVersionExisted = $(TRUE)
  199.         endif
  200.     endif
  201.     Ifstr(i) $(DetectedCard) != TRUE
  202.         Goto adaptersetup
  203.     Endif
  204.     StartWait
  205.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  206.     EndWait
  207.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  208.         Goto adaptersetup
  209.     Endif
  210.     Set DetectedParams = $($R1)
  211.     Debug-Output "OEMNADN2.INF: Calling Param_SetDefaults to merge detected params"
  212.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  213.     goto adaptersetup
  214. configureadapter = +
  215.     Ifstr $(KeyProduct) == $(KeyNull)
  216.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  217.         Ifstr $(KeyProduct) == $(KeyNull)
  218.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  219.             Debug-Output "Cannot find component product key"
  220.             goto fatalregistry
  221.         Endif
  222.     Endif
  223.     Debug-Output "INF: Shelling to FindService"
  224.     Shell $(UtilityInf) FindService, $(KeyProduct)
  225.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  226.         Debug-Output "INF: FindService shell failure"
  227.         Goto ShellCodeError
  228.     Endif
  229.     Ifstr(i) $($R0) != NO_ERROR
  230.         Debug-Output "INF: FindService Shell error: "$($R0)
  231.         Goto fatalregistry
  232.     endif
  233.     set KeyParameters = $($R2)
  234.     CloseRegKey $($R1)
  235.     Ifstr $(KeyParameters) == $(KeyNull)
  236.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  237.         Debug-Output "Cannot find component service"
  238.         goto fatalregistry
  239.     endif
  240.     set OldVersionExisted = $(TRUE)
  241.     set ValueName = ""
  242.     set ValueData = ""
  243.     set ValueStr  = ""
  244.     set ValueList = {}
  245.     EnumRegValue $(KeyParameters) ValueList
  246.     ForListDo $(ValueList)
  247.         set ValueItem = $($)
  248.         set ValueName = *($(ValueItem),1)
  249.         set ValueData = *($(ValueItem),4)
  250.         Ifstr(i) $(ValueName) == "InterruptNumber"
  251.             set IRQValue = $(ValueData)
  252.         else-ifstr(i) $(ValueName) == "IoBaseAddress"
  253.             set IOBaseAddrValue = $(ValueData)
  254.         else-ifstr(i) $(ValueName) == "BusType"
  255.             set BusInterfaceType = $(ValueData)
  256.         else-ifstr(i) $(ValueName) == "BusNumber"
  257.             set BusNumber = $(ValueData)
  258.         endif
  259.     EndForListDo
  260.     ifstr(i) $(IRQValue) == ""
  261.         set IRQValue = *($(IRQList), 2)
  262.     endif
  263.     ifstr(i) $(IOBaseAddrValue) == ""
  264.         set IOBaseAddrValue = *($(IOBaseAddrDecList), 1)
  265.     endif
  266. adaptersetup =+
  267.     Shell $(ParamInf) Param_ParameterConfidence
  268.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  269.         Debug-Output "OEMNADn1.INF: parameter confidence too low to bypass configuration"
  270.         Goto adapteroptions
  271.     Endif
  272.     Ifstr(i) $(DetectedCard) == TRUE
  273.         Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  274.             set BusInterfaceType = *($(!STF_NCDETINFO),5)
  275.             set BusNumber = *($(!STF_NCDETINFO),6)
  276.             Goto adapterverify
  277.         Endif
  278.     Endif
  279.     goto adapteroptions
  280. adapteroptions = +
  281.     set from = adapteroptions
  282.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  283.         ifstr(i) $(!AutoNetInterfaceType) != ""
  284.             set BusInterfaceType = $(!AutoNetInterfaceType)
  285.         else
  286.             set BusInterfaceType = 1    
  287.         endif
  288.         ifstr(i) $(!AutoNetBusNumber) != ""
  289.             set BusNumber = $(!AutoNetBusNumber)
  290.         else
  291.             set BusNumber = 0
  292.         endif
  293.         goto adapterverify
  294.     endif
  295.     set IOBaseAddress = *($(IOBaseAddrHexList), ~($(IOBaseAddrDecList),+
  296.         $(IOBaseAddrValue)))
  297.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  298.     ui start "InputDlg"
  299.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  300.                 set IRQValue = $(Combo1Out)
  301.                 set IOBaseAddress = $(Combo2Out)
  302.                 ui pop 1
  303.     else-ifstr(i) $(DLGEVENT) == "BACK"
  304.                 set CommonStatus = STATUS_USERCANCEL
  305.                 Debug-Output "Action: exit. Bye."
  306.                 ui pop 1
  307.                 goto end
  308.     else
  309.                 ui pop 1
  310.                 Debug-Output "Action: unknown. Bye."
  311.                 goto end
  312.     endif
  313.     set IOBaseAddrValue = *($(IOBaseAddrDecList), ~($(IOBaseAddrHexList),+
  314.         $(IOBaseAddress)))
  315.     ifstr(i) $(!STF_NCDETINFO) == {}
  316.         Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  317.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  318.             Debug-Output "ShellCode error."
  319.             goto ShellCodeError
  320.         endif
  321.         set BusInterfaceType = $($R1)
  322.         set BusNumber = $($R2)
  323.     else
  324.         set BusInterfaceType = *($(!STF_NCDETINFO),5)
  325.         set BusNumber = *($(!STF_NCDETINFO),6)
  326.     endif
  327. adapterverify =+
  328.     Ifstr(i) $(DetectedCard) != TRUE
  329.         Goto skipoptions
  330.     Endif
  331.     Debug-Output "OEMNADN2.INF: Calling Param_VerifyCard"
  332.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  333.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  334.         Debug-Output "OEMNADN2.INF: Param_VerifyCard succeeded"
  335.         Goto skipoptions
  336.     Endif
  337.     Set from = adapteroptions
  338.     Set to = skipoptions
  339.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  340.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  341.         Debug-Output "ShellCode error: cannot get an error string."
  342.         goto ShellCodeError
  343.     endif
  344.     set Error = $($R0)
  345.     Goto Warning
  346. skipoptions =+
  347.     ifint $(OldVersionExisted) == $(TRUE)
  348.         ifstr(i) $(!NTN_InstallMode) == configure
  349.                 goto writeparameters
  350.         endif
  351.     endif
  352.     StartWait
  353.     ifint $(OldVersionExisted) == $(FALSE)
  354.         ifstr(i) $(!NTN_InstallMode) == "install"
  355.                 Ifstr(i) $(DoCopy) == "YES"
  356.                     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  357.                     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  358.                         Goto ShellCodeError
  359.                     Else-Ifstr(i) $($R0) == STATUS_FAILED
  360.                         Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  361.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  362.                            goto ShellCodeError
  363.                         endif
  364.                         set Error = $($R0)
  365.                         Goto fatal
  366.                     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  367.                         Goto successful
  368.                     Endif
  369.                     Set SrcDir = $($R1)
  370.                 Endif
  371.                 install "Install-Option"
  372.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  373.                     Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  374.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  375.                         goto ShellCodeError
  376.                     endif
  377.                     set Error = $($R0)
  378.                     goto fatal
  379.                 endif
  380.         endif
  381.        Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  382.                         $(ProductSoftwareName), +
  383.                         $(ProductSoftwareName), +
  384.                         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  385.                         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  386.                         $(NetEventDLL)
  387.        Set OEM_ABANDON_SOFTWARE = TRUE
  388.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  389.         Debug-Output "ShellCode error"
  390.         goto ShellCodeError
  391.        endif
  392.        set RegistryErrorIndex = $($R0)
  393.        set KeyProduct      = $($R1)
  394.        Set SoftNetRulesKey = $($R2)
  395.        CloseRegKey $($R3)
  396.        CloseRegKey $($R4)
  397.        CloseRegKey $($R5)
  398.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  399.         EndWait
  400.         Debug-Output "Registry error: add software components"
  401.         CloseRegKey $(KeyProduct)
  402.         CloseRegKey $(SoftNetRulesKey)
  403.         goto fatalregistry
  404.        endif
  405.        set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  406.                    {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  407.                    {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  408.                    {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  409.                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  410.                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  411.                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  412.        Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  413.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  414.         Debug-Output "ShellCode error."
  415.         goto ShellCodeError
  416.        endif
  417.        set RegistryErrorIndex = $($R0)
  418.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  419.         EndWait
  420.         Debug-Output "Registry error: add value list."
  421.         CloseRegKey $(KeyProduct)
  422.         CloseRegKey $(SoftNetRulesKey)
  423.         goto fatalregistry
  424.        endif
  425.        set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  426.                         {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  427.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  428.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  429.                         {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  430.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  431.        Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  432.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  433.         Debug-Output "ShellCode error."
  434.         goto ShellCodeError
  435.        endif
  436.        set RegistryErrorIndex = $($R0)
  437.        CloseRegKey $(KeyProduct)
  438.        CloseRegKey $(SoftNetRulesKey)
  439.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  440.         EndWait
  441.         Debug-Output "Resgitry error: add value list."
  442.         goto fatalregistry
  443.        endif
  444.     endif
  445.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  446.     ifint $($R4) != -1
  447.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  448.     endif
  449.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  450.                 Debug-Output "Cannot add hardware component"
  451.                 goto ShellCodeError
  452.     endif
  453.     set RegistryErrorIndex = $($R0)
  454.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  455.                 EndWait
  456.                 Debug-Output "Registry error: add hardware component"
  457.                 CloseRegKey $($R1)
  458.                 CloseRegKey $($R2)
  459.                 CloseRegKey $($R3)
  460.                 goto fatalregistry
  461.     endif
  462.     set KeyParameters = $($R3)
  463.     set KeyAdapterRules = $($R2)
  464.     set AdapterNumber = $($R4)
  465.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  466.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  467.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  468.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  469.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  470.                        {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  471.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  472.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  473.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  474.                 Debug-Output "ShellCode error"
  475.                 goto ShellCodeError
  476.     endif
  477.     CloseRegKey $($R1)
  478.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  479.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  480.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  481.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  482.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  483.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  484.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  485.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  486.                 Debug-Output "ShellCode error."
  487.                 goto ShellCodeError
  488.     endif
  489.     set RegistryErrorIndex = $($R0)
  490.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  491.                 EndWait
  492.                 Debug-Output "Resgitry error: add value list."
  493.                 CloseRegKey $(KeyParameters)
  494.                 CloseRegKey $(KeyAdapterRules)
  495.                 goto fatalregistry
  496.     endif
  497.     CloseRegKey $(KeyAdapterRules)
  498.     goto writeparameters
  499. writeparameters = +
  500.     set NewValueList = {{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  501.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  502.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  503.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  504.                        {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
  505.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  506.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  507.         Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  508.     endif
  509.     CloseRegKey $(KeyParameters)
  510.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  511.                 Debug-Output "ShellCode error."
  512.                 goto ShellCodeError
  513.     endif
  514.     set RegistryErrorIndex = $($R0)
  515.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  516.                 Debug-Output "Registry error: Add value list"
  517.                 goto fatalregistry
  518.     endif
  519.     EndWait
  520.     goto successful
  521. bindingadapter =+
  522.     set Error = "Binding: Sorry, not yet implemented."
  523.     goto fatal
  524. removeadapter = +
  525.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  526.                 Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  527.                                 $(ProductSoftwareName)
  528.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  529.                                 Debug-Output "ShellCode error"
  530.                                 goto ShellCodeError
  531.                 endif
  532.                 set RegistryErrorIndex = $($R0)
  533.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  534.                                 goto fatalregistry
  535.                 endif
  536.     else
  537.                 Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  538.                         $(ProductSoftwareName), $(!NTN_RegBase)
  539.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  540.                                 Debug-Output "ShellCode error"
  541.                                 goto ShellCodeError
  542.                 endif
  543.                 set RegistryErrorIndex = $($R0)
  544.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  545.                                 goto fatalregistry
  546.                 endif
  547.     endif
  548.     goto end
  549. UpgradeSoftware = +
  550.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  551.     Ifstr $(KeyProduct) != $(KeyNull)
  552.         install "Install-Update"
  553.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  554.             goto fatal
  555.         endif
  556.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  557.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  558.         CloseRegKey $(KeyProduct)
  559.     else
  560.         goto fatalregistry
  561.     endif
  562.     set iSearch = 1
  563. nextnetcard = +
  564.     Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  565.     set KeyNetcard = $($R0)
  566.     set iSearch = $($R1)
  567.     Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  568.     Ifstr $(KeyNetcard) != $(KeyNull)
  569.         Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  570.         SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  571.         CloseRegKey $(KeyNetcard)
  572.         goto nextnetcard
  573.     Endif
  574.     goto end
  575. successful = +
  576.     goto end
  577. abandon = +
  578.     ForListDo $(OEM_ABANDON_OPTIONS)
  579.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  580.             $(ProductSoftwareName), $($)
  581.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  582.             Debug-Output "ShellCode error"
  583.             goto ShellCodeError
  584.         endif
  585.         set RegistryErrorIndex = $($R0)
  586.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  587.             goto fatalregistry
  588.         endif
  589.     EndForListDo
  590.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  591.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  592.             $(ProductSoftwareName), FALSE
  593.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  594.             Debug-Output "ShellCode error"
  595.             goto ShellCodeError
  596.         endif
  597.         set RegistryErrorIndex = $($R0)
  598.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  599.             goto fatalregistry
  600.         endif
  601.     endif
  602.     goto end
  603. warning = +
  604.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  605.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  606.         goto ShellCodeError
  607.     endif
  608.     ifstr(i) $($R1) == "OK"
  609.         goto $(to)
  610.     else-ifstr(i) $($R1) == "CANCEL"
  611.         goto $(from)
  612.     else
  613.         goto "end"
  614.     endif
  615. nonfatalinfo = +
  616.     Set CommonStatus = STATUS_USERCANCEL
  617.     Set Severity = STATUS
  618.     goto nonfatalmsg
  619. nonfatal = +
  620.     Set Severity = NONFATAL
  621.     goto nonfatalmsg
  622. nonfatalmsg = +
  623.     ifstr(i) $(Error) == ""
  624.         Set Severity = NONFATAL
  625.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  626.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  627.             goto ShellCodeError
  628.         endif
  629.         set Error = $($R0)
  630.     endif
  631.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  632.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  633.         goto ShellCodeError
  634.     endif
  635.     ifstr(i) $($R1) == "OK"
  636.         goto $(from)
  637.     else
  638.         goto "end"
  639.     endif
  640. fatalregistry = +
  641.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  642.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  643.         goto ShellCodeError
  644.     endif
  645.     set Error = $($R0)
  646.     goto fatal
  647. fataldetect = +
  648.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  649.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  650.         Debug-Output "ShellCode error: cannot get an error string."
  651.         goto ShellCodeError
  652.     endif
  653.     set Error = $($R0)
  654.     Goto fatal
  655. fatal = +
  656.     ifstr(i) $(Error) == ""
  657.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  658.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  659.             goto ShellCodeError
  660.         endif
  661.         set Error = $($R0)
  662.     endif
  663.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  664.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  665.         goto ShellCodeError
  666.     endif
  667.     goto setfailed
  668. ShellCodeError = +
  669.     set DlgType      = "MessageBox"
  670.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  671.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  672.     set STF_MB_TYPE  = 1
  673.     set STF_MB_ICON  = 3
  674.     set STF_MB_DEF   = 1
  675.     ui start "Error Message"
  676.     goto setfailed
  677. setfailed = +
  678.     set CommonStatus = STATUS_FAILED
  679.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  680.         set OEM_ABANDON_ON = FALSE
  681.         goto abandon
  682.     endif
  683.     goto end
  684. end = +
  685.     goto term
  686. term = +
  687.     Return $(CommonStatus)
  688. [Install-Option]
  689.     set STF_VITAL = ""
  690.     ifstr(i) $(AddCopy) == "YES"
  691.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  692.     endif
  693.     ifstr(i) $(DoCopy) == "YES"
  694.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  695.        CopyFilesInCopyList
  696.     endif
  697.     ifstr(i) $(DoConfig) == "YES"
  698.     endif
  699.     Exit
  700. [Install-Update]
  701.    set STF_VITAL        = ""
  702.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  703.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  704.    exit
  705. [Source Media Descriptions]
  706.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  707. [Signature]
  708.     FileType = MICROSOFT_FILE
  709. [GetSignature]
  710.     read-syms Signature
  711.     return $(FileType)
  712. [ProductType]
  713. STF_PRODUCT  = LanmanNT
  714. STF_PLATFORM = I386
  715. [Files-Inf]
  716. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  717. [Files-NE1000]
  718. 1,NE1000.SYS , SIZE=999
  719. [LanguagesSupported]
  720.     ENG
  721. [OptionsTextENG]
  722.     NE1000     = "Novell NE1000 Adapter"
  723. [FileConstantsENG]
  724. ProCaption   = "Windows NT Setup"
  725. ProCancel    = "Cancel"
  726. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  727.                "Are you sure you want to cancel copying files?"
  728. ProCancelCap = "Network Setup Message"
  729. ProText1     = "Copying:"
  730. ProText2     = "To:"
  731. FunctionTitle   = "Novell NE1000 Network Card Setup"
  732. ProductSoftwareDescription      = "Novell NE1000 Adapter Driver"
  733. ProductHardwareNE1000Description        = "Novell NE1000 Adapter"
  734. ProductSoftwareTitle    = "Novell NE1000 Adapter Driver"
  735. ProductHardwareNE1000Title      = "Novell NE1000 Adapter"
  736. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  737. ShellCodeErrorText      = "Shell Code Error."
  738. [DialogConstantsENG]
  739. Help        = "&Help"
  740. Exit        = "Cancel"
  741. OK          = "OK"
  742. HelpContext = ""
  743. Continue    = "Continue"
  744. Cancel      = "Cancel"
  745. [FileDependentDlgENG]
  746. Label1 = "&IRQ Level:"
  747. Label2 = "I/O &Port Address:"
  748. DlgType = "RadioCombination"
  749. DlgTemplate = "NE2000"
  750. Caption = $(FunctionTitle)
  751. Combo1List = $(IRQList)
  752. Combo1Out  = $(IRQValue)
  753. Combo2List = $(IOBaseAddrHexList)
  754. Combo2Out  = $(IOBaseAddress)
  755. ComboListItemsIn  = {Combo1List, Combo2List}
  756. ComboListItemsOut = {Combo1Out, Combo2Out}
  757. EditTextIn = ""
  758. EditTextLim = ""
  759. CBOptionsGreyed = {}
  760. NotifyFields = {NO, NO}
  761. HelpContext = $(!IDH_DB_OEMNADN2_INS)
  762.